package com.hxzy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxzy.dto.MerchandiseClassSearchDTO;
import com.hxzy.entity.MerchandiseClass;
import com.hxzy.mapper.MerchandiseClassMapper;
import com.hxzy.service.MerchandiseClassService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商品分类
 * @author Administrator
 */
@Service
public class MerchandiseClassServiceImpl extends ServiceImpl<MerchandiseClassMapper, MerchandiseClass> implements MerchandiseClassService {


    @Override
    public List<MerchandiseClass> search(MerchandiseClassSearchDTO merchandiseClassSearchDTO) {
        return  super.getBaseMapper().search(merchandiseClassSearchDTO);
    }

    @Override
    public MerchandiseClass selectByPrimaryKey(Long id, Long merchantId) {
        return  super.getBaseMapper().selectByPrimaryKey(id,merchantId);
    }

    @Override
    public List<MerchandiseClass> findByMerchandiseId( ) {
        return super.getBaseMapper().findByMerchandiseId();
    }

    /**
     * 根据指定的商家查询分类
     * @param merchantId
     * @return
     */
    @Override
    public List<MerchandiseClass> findByMerchandiseId(Long merchantId) {
        return super.getBaseMapper().findByMerId(merchantId);
    }
}
